import request from '@/utils/request'
export function getPage(pageParam) {
  return request({
    url: '/gscloud_platform/platform/barCounter/page',
    method: 'get',
    params: pageParam
  })
}

export function addsave(data) {
  return request({
    url: '/gscloud_platform/platform/barCounterInvestor/save',
    method: 'post',
    data
  })
}

export function detail(data) {
  return request({
    url: '/gscloud_platform/platform/barCounter/getById',
    method: 'get',
    data
  })
}

// 获取货柜
export function barCounterContainerPage(data) {
  return request({
    url: '/gscloud_platform/platform/barSpu/page',
    method: 'get',
    params: data
  })
}

// 获取柜台
export function barCounterContainer() {
  return request({
    url: '/gscloud_platform/platform/barCounterContainer/getList',
    method: 'get',
  })
}

// 获取商品
export function barSpu(data) {
  return request({
    url: '/gscloud_product/admin/spu/page',
    method: 'get',
    params: data
  })
}

// 规格-推荐商品获取规格信息
export function getSpuSku(data) {
  return request({
    url: '/gscloud_product/admin/spu/list_by_spu',
    method: 'get',
    params: data
  })
}

// 获取投资人
export function investorList(data) {
  return request({
    url: '/gscloud_platform/platform/barCounterInvestor/getList',
    method: 'get',
    data
  })
}

// 获取商铺
export function barCounterShopList(data) {
  return request({
    url: '/gscloud_platform/platform/barCounterShop/list',
    method: 'get',
    data
  })
}

// 获取商铺
export function save(data) {
  return request({
    url: '/gscloud_platform/platform/barCounter/save',
    method: 'post',
    data
  })
}

// 获取复制
export function saveForCopy(data) {
  return request({
    url: '/gscloud_platform/platform/barCounter/saveForCopy',
    method: 'post',
    data
  })
}

// 获取详情
export function getById(data) {
  return request({
    url: '/gscloud_platform/platform/barCounter/getById',
    method: 'get',
    params: data
  })
}

// 查询历史订单
export function search_order(data) {
  return request({
    url: '/gscloud_order/p/myOrder/search_order',
    method: 'get',
    params: data
  })
}

// 查询历史订单
export function barSku(data) {
  return request({
    url: '/gscloud_platform/platform/barSku/page',
    method: 'get',
    params: data
  })
}

// 删除
export function del(data) {
  return request({
    url: '/gscloud_platform/platform/barCounter/deleteById',
    method: 'delete',
    params: data
  })
}

// 修改
export function edit(data) {
  return request({
    url: '/gscloud_platform/platform/barCounter/update',
    method: 'put',
    data: data
  })
}